package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Application;
import lombok.Data;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.sql.Date;
import java.util.List;


@Repository
public interface ApplicationMapper extends BaseMapper<Application> {
    Application findById(@Param("application_id") Long aid);
    List<Application> findByStudentId(@Param("student_id") Long sid);
    List<Application> findByCoachId(@Param("coach_id") Long cid);
    List<Application> findAllApplication();
    void updateApplication(@Param("application_id")Long applicationId,
                           @Param("coach_id")Long coachId,
                           @Param("licence_id")Long licenceId,
                           @Param("student_id")Long studentId,
                           @Param("application_time")Date applicationTime,
                           @Param("application_preference")String applicationPreference,
                           @Param("application_finished")String applicationFinished);

}
